<?php
	include_once('header.php');
	if ($_SERVER['REQUEST_METHOD']=='POST') {
		$site_name = addslashes($_POST['site_name']);
		$site_name_2 = addslashes($_POST['site_name_2']);
		$query_site_name = "update `setting` set `value`='".$site_name."' where `name`='site_name'";
		$query_site_name_2 = "update `setting` set `value`='".$site_name_2."' where `name`='site_name_2'";
		$mysql_connection->query($query_site_name);
		$mysql_connection->query($query_site_name_2);
	}
	// start 取得设置信息
	$query_name = "select * from `setting` where `name`='site_name'";
	$query_name_2 = "select * from `setting` where `name`='site_name_2'";
	$site_name_value = $mysql_connection->query($query_name);
	$site_name_value = $site_name_value->fetch_assoc();
	$site_name_value = $site_name_value['value'];
	$site_name_2_value = $mysql_connection->query($query_name_2);
	$site_name_2_value = $site_name_2_value->fetch_assoc();
	$site_name_2_value = $site_name_2_value['value'];
	// end 取得设置信息
?>
<div id="content_b"><form action="<?php echo $_SERVER['PHP_SELF'];?>?message_box=常规设置更新成功" method="post"><table width="100%">
	<tr><td>博客标题</td>
	<td><input class="input_text" type="text" name="site_name" value="<?php echo $site_name_value;?>" /></td></tr>
	<tr><td>博客副标题</td>
	<td><input class="input_text" type="text" name="site_name_2" value="<?php echo $site_name_2_value;?>" /></td></tr>
</table>
<input type="submit" value="保存修改" />
<form></div>
<?php include_once('footer.php'); ?>
